const e = React.createElement;

function LikeButton() {
    let isLike = false;

    const style = {
        width: "120px",
        height: "40px",
        borderRadius: "8px",
    };

    const handleClick = () => {
        const btn = document.querySelector("button");
        isLike = !isLike;
        if (isLike) {
            btn.innerHTML = "Unlike";
            btn.style.background = "#ef6565";
        } else {
            btn.innerHTML = "Like";
            btn.style.background = "#ffffff";
        }
    };

    return (
        <button style={style} onClick={handleClick}>
            Like
        </button>
    );
}

ReactDOM.render(e(LikeButton), document.getElementById("app"));
